{php load()->func('tpl')}
<input type="hidden" name="reply_id" value="{$reply['id']}" />
<div class="panel panel-default">
    <div class="panel-heading">
        活动设置
    </div>
    <div class="panel-body">
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span> 活动标题</label>
            <div class="col-sm-9 col-xs-12">
               	<input type="text" id="title" class="form-control" placeholder="" name="title" value="{$reply['title']}">
            </div>
        </div>
 <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span> 活动图片</label>
            <div class="col-sm-9 col-xs-12">
               	{php echo tpl_form_field_image('start_picurl',$reply['start_picurl']);}
            </div>
        </div>
        
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span> 活动说明</label>
            <div class="col-sm-9 col-xs-12">
               	<textarea style="height:60px;" id='description' name="description" class="form-control" cols="60">{$reply['description']}</textarea>
            </div>
        </div>
        
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span> 活动时间</label>
            <div class="col-sm-9 col-xs-12">
               	{php echo tpl_form_field_daterange('datelimit', array('starttime'=>date('Y-m-d H:i', $reply['starttime']),'endtime'=>date('Y-m-d H:i',$reply['endtime'])),true)}
            </div>
        </div>
        
         <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span> 游戏时间</label>
            <div class="col-sm-4">
                <div class="input-group">
               <input type="text" value="{$reply['game_time']}" class="form-control" name="game_time">
               <span class="input-group-addon">秒</span>
               </div>
	<div class="help-block">游戏时间上限.</div>
            </div>
        </div>
        
            <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">  强制关注</label>
            <div class="col-sm-9 col-xs-12">
              <label for="follow_1" class="radio-inline"><input type="radio" name="isfollow" id="follow_1" value="1" {if $reply['isfollow']==1}checked="checked"{/if}> 关注可玩</label>
              <label for="follow_0" class="radio-inline"><input type="radio" name="isfollow" id="follow_0"  value="0" {if $reply['isfollow']==0}checked="checked"{/if}>任意可玩 </label>
	<span class="help-block">是否只有关注用户可以玩, 如果选择任意可玩，则需要是服务号或者借用OAuth2 高级授权</span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">关注网址</label>
            <div class="col-sm-9 col-xs-12">
             <input type="text" value="{$reply['followurl']}" class="form-control" name="followurl">
					<div class="help-block">提示关注网址(选择关注可玩必填).</div>
            </div>
        </div>
        
         <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">  填写用户个人信息</label>
            <div class="col-sm-9 col-xs-12">
<label for="reg_1" class="radio-inline"><input type="radio" name="reg_first" id="reg_1" value="1" {if $reply['reg_first']==1}checked="checked"{/if}> 游戏前</label>
	<label for="reg_0" class="radio-inline"><input type="radio" name="reg_first" id="reg_0"  value="0" {if $reply['reg_first']==0}checked="checked"{/if}>游戏后 </label>
            </div>
        </div>
        
         <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">最大金额</label>
            <div class="col-sm-9 col-xs-12">
                  <div class="input-group">
               <input type="text" value="{$reply['max_sum']}" class="form-control" name="max_sum">
               <span class="input-group-addon">元</span>
               </div>
     
					<div class="help-block">0为不限，可设置具体数值来避免个别外挂行为，但是您需要进行最大值预估。预估方法：设置好游戏后，商家可自行玩游戏，很努力的情况下如玩了1000元，就可设置一个2000左右的最大限，设置后用户即便玩到2100，也只能领取2000元的现金券。</div>
            </div>
        </div>
        
           <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">最小金额</label>
            <div class="col-sm-9 col-xs-12">
     <div class="input-group">
               <input type="text" value="{$reply['min_sum']}" class="form-control" name="min_sum">
               <span class="input-group-addon">元</span>
               </div>
	<div class="help-block">0为不限，可设置具体数值来避免个别外挂行为，但是您需要进行最大值预估。预估方法：设置好游戏后，商家可自行玩游戏，很努力的情况下如玩了1000元，就可设置一个2000左右的最大限，设置后用户即便玩到2100，也只能领取2000元的现金券。</div>
            </div>
        </div>
        
          <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">现金券名称</label>
            <div class="col-sm-9 col-xs-12">
               	<input type="text" value="{$reply['remain_name']}" class="form-control" name="remain_name">
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">现金券有效期</label>
            <div class="col-sm-9 col-xs-12">
               	 {php echo tpl_form_field_daterange('datelimit1', array('starttime'=>date('Y-m-d H:i', $reply['remain_stime']),'endtime'=>date('Y-m-d H:i',$reply['remain_etime'])),true)}
            </div>
        </div>
        
       
        
           <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">现金券面额及占比设置</label>
            <div class="col-sm-9 col-xs-12">
               	<table>
							<thead>
								<tr>
									<th style="width:10px;">面额</th>
                                   <th style="width:120px;">占比(%)</th>
								</tr>
							</thead>
							<tbody id="re-items">
									<tr id='c_one'>
                                     <td><label class="checkbox-inline"><input type="checkbox" name="checkbox1" value="checkbox" {if $reply['c_rate_one']>0}checked="checked"{/if}> 1角</label></td>
                                      <td><input id="c_rate_one"  name="c_rate_one" type="text" class="form-control" value="{$reply['c_rate_one']}" /></td>
									</tr>
									<tr id='c_two'>
										<td><label class="checkbox-inline"><input type="checkbox" name="checkbox2" value="checkbox" {if $reply['c_rate_two']>0}checked="checked"{/if}> 2角</label></td>
                                      <td><input id="c_rate_two"  name="c_rate_two" type="text" class="form-control" value="{$reply['c_rate_two']}" /></td>
									</tr>
									<tr id='c_three'>
										<td><label class="checkbox-inline"><input type="checkbox" name="checkbox3" value="checkbox" {if $reply['c_rate_three']>0}checked="checked"{/if}> 5角</label></td>
                                       <td><input id="c_rate_three"  name="c_rate_three" type="text" class="form-control" value="{$reply['c_rate_three']}" /></td>
									</tr>
									<tr id='c_four'>
										<td><label class="checkbox-inline"><input type="checkbox" name="checkbox4" value="checkbox" {if $reply['c_rate_four']>0}checked="checked"{/if}> 1元</label></td>
                                    <td><input id="c_rate_four"  name="c_rate_four" type="text" class="form-control" value="{$reply['c_rate_four']}" /></td>
									</tr>
									<tr id='c_five'>
										<td><label class="checkbox-inline"><input type="checkbox" name="checkbox5" value="checkbox" {if $reply['c_rate_five']>0}checked="checked"{/if}> 5元</label></td>
                                     <td><input id="c_rate_five"  name="c_rate_five" type="text" class="form-control" value="{$reply['c_rate_five']}" /></td>
									</tr>
									<tr id='c_six'>
										<td><label class="checkbox-inline"><input type="checkbox" name="checkbox6" value="checkbox" {if $reply['c_rate_six']>0}checked="checked"{/if}> 10元</label></td>
                                     <td><input id="c_rate_six"  name="c_rate_six" type="text" class="form-control" value="{$reply['c_rate_six']}" /></td>
									</tr>
									<tr id='c_seven'>
										<td><label class="checkbox-inline"><input type="checkbox" name="checkbox7" value="checkbox" {if $reply['c_rate_seven']>0}checked="checked"{/if}> 20元</label></td>
                                     <td><input id="c_rate_seven"  name="c_rate_seven" type="text" class="form-control" value="{$reply['c_rate_seven']}" /></td>
									</tr>
									<tr id='c_eight'>
										<td><label class="checkbox-inline"><input type="checkbox" name="checkbox8" value="checkbox" {if $reply['c_rate_eight']>0}checked="checked"{/if}> 50元</label></td>
                                    <td><input id="c_rate_eight"  name="c_rate_eight" type="text" class="form-control" value="{$reply['c_rate_eight']}" /></td>
									</tr>
									<tr id='c_nine'>
										<td><label class="checkbox-inline"><input type="checkbox" name="checkbox9" value="checkbox" {if $reply['c_rate_nine']>0}checked="checked"{/if}> 100元</label></td>
                                     <td><input id="c_rate_nine"  name="c_rate_nine" type="text" class="form-control" value="{$reply['c_rate_nine']}" /></td>
									</tr>
							</tbody>
						</table>
            </div>
        </div>
    
            <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">抽奖次数</label>
            <div class="col-sm-5">
                <div class="input-group">
                    <span class="input-group-addon">总</span>
                    <input type="text" value="{$reply['alltimes']}" class="form-control" name="alltimes" placeholder="填次数">
	  <span class="input-group-addon">次，每天</span>
						<input type="text" value="{$reply['daytimes']}" class="form-control" name="daytimes" placeholder="填次数">
						<span class="input-group-addon">次</span>
                                                
                </div>
       
             <div class="help-block">总次数，每天次数。0为不限制</div>
                                            
                
            </div>
        </div>
         
                        
        
            <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">现金劵规则</label>
            <div class="col-sm-9 col-xs-12">
               <input type="text" value="{$reply['remain_rule']}" class="form-control" name="remain_rule">
					<div class="help-block">活动的相关说明和活动奖品介绍。.</div>
            </div>
        </div>
             <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">现金劵张数</label>
            <div class="col-sm-5">
                <div class="input-group">
                    <span class="input-group-addon">总</span>
                    <input type="text" value="{$reply['total_remain']}" class="form-control" name="total_remain" placeholder="填张数">
	  <span class="input-group-addon">张，每人</span>
						<input type="text" value="{$reply['remain']}" class="form-control" name="remain" placeholder="填张数">
						<span class="input-group-addon">张</span>
                                                
                </div>
       
                <div class="help-block">总张数，每人张数。</div>
                                            
                
            </div>
        </div>
        
       
        
             <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">现金劵张数</label>
            <div class="col-sm-5">
                <div class="input-group">
                    <span class="input-group-addon">总</span>
                    <input type="text" value="{$reply['total_remain']}" class="form-control" name="total_remain" placeholder="填张数">
	  <span class="input-group-addon">张，每人</span>
						<input type="text" value="{$reply['remain']}" class="form-control" name="remain" placeholder="填张数">
						<span class="input-group-addon">张</span>
                                                
                </div>
       
                <div class="help-block">总张数，每人张数。</div>
                                            
                
            </div>
        </div>
        
       
        
                 <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">兑奖密码</label>
            <div class="col-sm-9 col-xs-12">
             <input type="text" value="{$reply['remain_sm']}" class="form-control" name="remain_sm" maxlength="15">
					<div class="help-block">密码长度小于15位.</div>
            </div>
        </div>
       <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">活动规则</label>
            <div class="col-sm-9 col-xs-12">
            <textarea   style="height:150px;" name="rule" class="form-control rule" cols="60">{$reply['rule']}</textarea>
					<div class="help-block">活动的相关说明和活动奖品介绍。</div>
            </div>
        </div>
        
         <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">站名或商家简称</label>
            <div class="col-sm-9 col-xs-12">
      <input type="text" value="{$reply['homename']}" class="form-control" name="homename">
					<div class="help-block">站名或商家简称，在前台右下角显示</div>
            </div>
        </div>
             <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">网址或商家关注页</label>
            <div class="col-sm-9 col-xs-12">
 <input type="text" value="{$reply['homeurl']}" class="form-control" name="homeurl">
					<div class="help-block">网址或商家关注页，在前台右下角显示</div>
            </div>
        </div>
        
        
    </div>
</div>
 

<script type="text/javascript">
    require(['util'],function(util){
        util.editor( $(".rule")[0]);
    })
</script>
